import tabbarItems from '../../common/datas/tabbarItem.js';
import router from '@system.router';
export default {
    data:{
        colorlist:["#5967EA", "#000000"],
        tabbarItems
    },
    //父组件传递props:["index"],
    props:{
           index:{
               type:Number
           },
        default(){
            return 0;
        }
    },
    jump(index)
    {
        switch (index) {
            case 0:
                router.replace({
                    uri: "pages/home/home"
                });
                break;
            case 1:
                router.replace({
                    uri: "pages/historyResult/historyResult",
                });
                break;
            case 2:
                router.replace({
                    uri: "pages/device/device",
                });
                break;
            case 3:
            router.replace({
                uri: "pages/mine/mine"
            });
            break;
        }
    }
}